clear all; clc; close all;
RC = 1e-6;
a = [RC 1]; b = [1];
Fs = 100; Fmax = 4e5; f = 0:Fs:Fmax;
H = freqs(b, a, 2*pi*f);
figure(1); subplot(2,1,1);
plot(f/1e6, 20*log10(abs(H)));
subplot(2,1,2);
plot(f/1e6, rad2deg(unwrap(angle(H))));
sys = tf(b,a);
[y,t] = impulse(sys);% Без ‘[y, t] =‘
% сразу построит график
figure(1); plot(t, y);
xlabel('t, s'); ylabel('h(t)');
grid on
[z,p,k] = tf2zp(b,a)